package com.noocodecommit.wicket.stuff.jquery.plugin.effects.scale;

import com.noocodecommit.wicket.stuff.jquery.plugin.JQPluginOptions;

/**
 * JQuery Effects Size Animation options set
 * 
 * @author Benoit Bouchez
 * 
 */
public class JQSizeOptions extends JQPluginOptions
{
	/** Both scale value */
	public static String SCALE_BOTH = "both";
	/** Box scale value */
	public static String SCALE_BOX = "box";
	/** Content scale value */
	public static String SCALE_CONTENT = "content";
	/** None scale value */
	public static String SCALE_NONE = "none";

	/** Restore */
	private boolean restore;
	/** Scale */
	private String scale;
	/** From */
	private int[] from = new int[2];
	/** To */
	private int[] to = new int[2];

	/**
	 * Constructor
	 */
	public JQSizeOptions()
	{
		super();
	}

	/**
	 * Gets the restore value
	 * 
	 * @return the restore value
	 */
	public boolean isRestore()
	{
		return restore;
	}

	/**
	 * Sets the restore option value
	 * 
	 * @param restore
	 *            size restore
	 */
	public void setRestore(boolean restore)
	{
		this.restore = restore;
		this.options.put("restore", "restore:" + restore);
	}

	/**
	 * Gets the scale value
	 * 
	 * @return the scale value
	 */
	public String getScale()
	{
		return scale;
	}

	/**
	 * Sets the scale option value
	 * 
	 * @param scale
	 *            size scale
	 */
	public void setScale(String scale)
	{
		this.scale = scale;
		this.options.put("scale", "scale:'" + scale + "'");
	}

	/**
	 * Gets the from value
	 * 
	 * @return the direction value
	 */
	public int[] getFrom()
	{
		return from;
	}

	/**
	 * Sets the from option value
	 * 
	 * @param from
	 *            size from
	 */
	public void setFrom(int[] from)
	{
		this.from = from;
		this.options.put("from", "from:{width:" + from[0] + ", height:" + from[1] + "}");
	}

	/**
	 * Gets the to value
	 * 
	 * @return the direction value
	 */
	public int[] getTo()
	{
		return to;
	}

	/**
	 * Sets the to option value
	 * 
	 * @param to
	 *            size to
	 */
	public void setTo(int[] to)
	{
		this.to = to;
		this.options.put("to", "to:{width:" + to[0] + ", height:" + to[1] + "}");
	}

}
